﻿using System;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;



namespace Organized
{
    public class Drawable3dComponent : Component, I3DComponent
    {

        public virtual Vector3 Scale { get; set; }

        public virtual BoundingBox BoundingBox
        {
            get
            {
                return new BoundingBox(Position - (Scale * 40), Position + (Scale * 40));
            }
        }

        public virtual BoundingSphere BoundingSphere
        {
            get
            {
                return new BoundingSphere(Position, Scale.X * 20f);
            }
        }

        public virtual Vector3 Position { get; set; }

        public Vector3 EulerRotation
        {
            get { return MathUtil.MatrixToVector3(Rotation); }
            set { Rotation = MathUtil.Vector3ToMatrix(value); }
        }

        public virtual Matrix Rotation
        {
            get;

            set;

        }


        
        //variables
        public Lighting lighting;


        public Drawable3dComponent(Lighting _light, Vector3 Position, GameScreen Parent)
            : base(Parent)
        {
            lighting = _light;
            this.Position = Position;

        }


        public virtual void DrawDepthMap()
        {           
        }

    }

}